package repo

import (
	_ "github.com/go-sql-driver/mysql"
	"user-server/src/model"
)

type UserInfoDao interface {

	//QueryUserByUsername 根据用户名查询用户信息
	QueryUserByUsername(username string) (*model.UserInfo, error)

	//UpdateByUsername 更新用户的昵称或者头像信息
	UpdateByUsername(username, nickname, profile string) (bool, error)
}

var userInfoDao UserInfoDao

func RefUserInfoDao() UserInfoDao {
	return userInfoDao
}

func InjectUserInfoDao(impl UserInfoDao) {
	userInfoDao = impl
}
